﻿using Model;
using Repository.Base.EFCore;

namespace Services.Impl
{
    public class UsersService : IUsersService
    {
        private readonly IRepositoryCore<Users> _context;
        public UsersService(IRepositoryCore<Users> context)
        {
            _context = context;
        }

        public bool Add(Users model)
        {
            _context.Insert(model);
            return true;
        }

        public bool FindNull()
        {
            return true;
        }

        public Users GetUsersById(int id)
        {
            var model = _context.FindEntity<Users>(p => p.ID == id);
            return model;
        }
    }
}
